total = 80000

month_return = 80000 / 12
rate_total = 0
for i in range(12):
    rate_i = 304 / total * 12
    rate_total += rate_i
    print("month:{:2}, total:{:09.3f}, rate:{: 8.6f}".format(i + 1, total, rate_i))
    total -= month_return

print(rate_total / 12)
